home *** CD-ROM | disk | FTP | other *** search
/ Languguage OS 2 / Languguage OS II Version 10-94 (Knowledge Media)(1994).ISO / gnu / objcissu.lha / memory-management < prev    next >
Internet Message Format  |  1993-03-01  |  21KB

  1. Date: Wed, 30 Sep 92 15:23:14 -0400
  2. From: Kurt D. Starsinic <kstar@medequity.com>
  3. To: gnu-objc@prep.ai.mit.edu
  4. Subject: Automatic object variables (Was: Objective-C + C++ -> ObjC++)
  5.  
  6. Andrew writes:
  7.  
  8. > Begin forwarded message:
  9. >
  10. > Date: Wed, 30 Sep 92 11:25:14 -0400
  11. > From: athan@object.com (Andrew Athan)
  12. > To: gnu-objc@prep.ai.mit.edu
  13. > Subject: Re: Automatic object variables (Was: Objective-C + C++ -> ObjC++)
  14. >
  15. >
  16. >
  17. > Begin forwarded message:
  18. >
  19. > Date: Wed, 30 Sep 92 11:22:53 -0400
  20. > From: athan@object.com (Andrew Athan)
  21. > To: athan
  22. > Subject: Re: Objective-C + C++ -> ObjC++
  23. >
  24. > Bill Burcham writes:
  25. > >NeXT Object class provides allocFromZone:.  I think an allocFromAutomatic >would be an elegant approach.  allocFromAutomatic would use alloca() (see >MALLOC(3)) to allocate memory from the stack.
  26. >
  27. > This would solve the problem only in the case of objects that do not have out-of-line storage associated with them.  E.g.,
  28. >
  29. > @interface MyString:Object
  30. > {
  31. >   char *theBuffer;
  32. > }
  33. > @end
  34. >
  35. > would end up leaving whatever "theBuffer" points to unfreed on function return.
  36. >
  37. > The "problem" with automatic object allocation is that it introduces the need for constructor & destructor syntax/semantics.
  38. >
  39. > Andrew Athan
  40. > Objective Technologies, Inc.
  41. >
  42.  
  43.     I, personally, am going on the assumption that, on exit from the stack frame, all of your automatic objects would be sent -free.
  44.     
  45.     All that this requires to work is that -free deallocates any allocated memory, which it's supposed to do anyway.  You can do without writing a -free method, in which case you're open to memory leaks.
  46.     
  47.     - Kurt
  48.  
  49. Kurt Starsinic                  #   kstar@medequity.com
  50. Director of Systems             #     (NeXTmail preferred)
  51. MedEquity, Inc.                 #
  52. 555 North Lane, Suite 6183      #     (215) 397-0201 voice
  53. Conshohocken, PA  19428         #           397-0203 fax
  54.  
  55. The opinions expressed by me just might be those of MedEquity, Inc.
  56.  
  57.    "What we think, or what we know, or what we believe is, in the end,
  58.     of little consequence.  The only consequence is what we do."
  59.       - John Rushin
  60.  
  61. Return-Path: <burchard@geom.umn.edu>
  62. Date: Mon, 22 Feb 93 17:59:19 -0600
  63. From: burchard@geom.umn.edu
  64. To: gnu-objc@gnu.ai.mit.edu
  65. Subject: Cleanup of basic Obj-C memory management protocol
  66.  
  67. I would like to propose some very slight and simple changes to the  
  68. basic memory management methods of the Object class in the GNU Obj-C  
  69. runtime.  These changes will make the GNU runtime MORE compatible  
  70. with both NeXT and Stepstone; moreover, they will enable cleaner  
  71. subclassing of these basic operations.
  72.  
  73. These changes are very simple and complete source code is given  
  74. below.
  75.  
  76. The basic principle is to allow memory allocation and initialization  
  77. to be performed by separate methods.  This is necessary for proper  
  78. subclassing, because the object which is performing the allocation is  
  79. NOT the same as the one which is subsequently initialized!
  80.  
  81. NeXT has already made this split for +new.  I propose to do the same  
  82. with -copy, which is currently a bit ugly to subclass.  Thus, in the  
  83. Object class, there should be two analogous divisions of labor:
  84.  
  85.     (+new)  = (+alloc)       + (-init)
  86.     (-copy) = (-shallowCopy) + (-deep)
  87.  
  88. Note that this is completely compatible with "old style" code---both  
  89. +new and -copy may still be overridden directly, by software that  
  90. assumes they are the basic runtime methods, without any adverse  
  91. effect.
  92.  
  93. However, savvy programs will almost always override only -init and  
  94. -deep, which provide a cleaner way for subclasses to modify these  
  95. operations.  To be absolutely clear, let me spell out what each  
  96. method's responsibility is:
  97.  
  98. -copy
  99.     This method should "do the right thing" for each class, to
  100.     produce a working copy of the object.
  101.     
  102.     One problem encountered by this method is that after a
  103.     shallow copy of the receiver is made, the remaining 
  104.  
  105.     operations take place in the new object, not the one being
  106.     copied.  In order for this to work well with subclassing, 
  107.  
  108.     there needs to be a separate, subclassable method to handle 
  109.  
  110.     the operations which "deepen" the copy.  This is the purpose
  111.     of the -deep method below.  The only job of -copy is to
  112.     allocate a new shallow copy and then call -deep on it.
  113.     
  114.     The Object class should define this method as a combination
  115.     of -shallowCopy and -deep.  This does not conflict with 
  116.  
  117.     existing classes on the NeXT, which don't define -deep.
  118.     
  119. -deep
  120.     This method allows subclasses to extend the way in which a
  121.     copy is deepened.  It is normally not necessary to override
  122.     the -copy method at all (unless you really want to change
  123.     the allocation procedures).
  124.     
  125.     For example:
  126.     
  127.     @implementation MyClass : MySuperclass
  128.     {
  129.         int *thang;
  130.         int thangSize;
  131.     }
  132.     
  133.     - deep
  134.     {
  135.         int *oldThang;
  136.     
  137.         if(![super deep]) return nil;
  138.         
  139.  
  140.         oldThang = thang;
  141.         if(!MALLOC(thang, int, thangSize))
  142.             { [self free]; return nil; }
  143.         bcopy(oldThang, thang, thangSize*sizeof(int));
  144.         return self;
  145.     }    
  146.  
  147. -shallowCopy
  148.     This method is simply a wrapper for object_copy(), and should
  149.     not be overridden.  It allocates space for a new object and
  150.     fills that space with an exact binary duplicate of the 
  151.  
  152.     receiver's direct instance variables.
  153.  
  154. ###-deepCopy###
  155.     This method should not really exist, except for compatibility
  156.     with Stepstone's Obj-C.  If this method doesn't perform the
  157.     same operation as -copy, described above, it's probably
  158.     the wrong thing to do.
  159.  
  160. The +new, +alloc, and -init methods have been already described well  
  161. by NeXT, so I won't repeat that.  Here is the complete source code:
  162.  
  163.  
  164. ---------------------- changes to Object.m ----------------------
  165.  
  166. - copy
  167. {
  168.     return [[self shallowCopy] deep];
  169. }
  170.  
  171. - shallowCopy
  172. {
  173.     return object_copy(self);
  174. }
  175.  
  176. - deep
  177. {
  178.     // Subclasses extend this.
  179.     return self;
  180. }
  181.  
  182. - deepCopy
  183. {
  184.     // For Stepstone compatibility only.
  185.     // Does not actually guarantee literal "deep copy".
  186.     return [self copy];
  187. }
  188.  
  189. + new
  190. {
  191.     return [[self alloc] init];
  192. }
  193.  
  194. + alloc
  195. {
  196.     return class_createInstance((Class_t)self);
  197. }
  198.  
  199. - init
  200. {
  201.     // Subclasses extend this.
  202.     return self;
  203. }
  204.  
  205.  
  206. --------------------------------------------------------------------
  207. Paul Burchard    <burchard@geom.umn.edu>
  208. ``I'm still learning how to count backwards from infinity...''
  209. --------------------------------------------------------------------
  210.  
  211. Return-Path: <krab@iesd.auc.dk>
  212. Date: Tue, 23 Feb 1993 05:58:20 +0100
  213. From: Kresten Krab Thorup <krab@iesd.auc.dk>
  214. To: burchard@geom.umn.edu
  215. In-Reply-To: <9302222359.AA14782@mobius.geom.umn.edu>
  216. Subject: Cleanup of basic Obj-C memory management protocol
  217. Cc: krab@iesd.auc.dk, gnu-objc@gnu.ai.mit.edu
  218.  
  219. burchard@geom.umn.edu writes:
  220. >I would like to propose some very slight and simple changes to the  
  221. >basic memory management methods of the Object class in the GNU Obj-C  
  222. >runtime.  These changes will make the GNU runtime MORE compatible  
  223. >with both NeXT and Stepstone; moreover, they will enable cleaner  
  224. >subclassing of these basic operations.
  225.  
  226. In my opinion -- install it rightaway!  There is simply no reason not
  227. to do it.  I have been thinking of suggesting this, but I've been too
  228. buzy exploring the issues of the runtime.  
  229.  
  230. /Kresten
  231.  
  232.  
  233. Return-Path: <a3bee2!seltd!lerman@mercury.hsi.com>
  234. From: Kenneth Lerman <seltd!lerman@uunet.UU.NET>
  235. X-Mailer: SCO System V Mail (version 3.2)
  236. To: burchard@geom.umn.edu, gnu-objc@gnu.ai.mit.edu
  237. Subject: Re: Cleanup of basic Obj-C memory management protocol
  238. Date: Tue, 23 Feb 93 16:28:21 EST
  239.  
  240. Paul Burchard    <burchard@geom.umn.edu> wrote (as part of a long posting):
  241.  
  242. ###-deepCopy###
  243.     This method should not really exist, except for compatibility
  244.     with Stepstone's Obj-C.  If this method doesn't perform the
  245.     same operation as -copy, described above, it's probably
  246.     the wrong thing to do.
  247.  
  248. (IMHO) No.  Copy and deep copy are NOT the same.
  249.  
  250. Copy produces a normally functioning object.  If you do:
  251.     bar = [foo copy]; [bar free]; 
  252. there will be no leaked memory.
  253.  
  254. Deep copy recursively copies the object and everything it points to.
  255. For instance,
  256.     gag = [anOrdCltn deepcopy];
  257. will copy the OrdCltn, its contents, and everything it contains.  Thus,
  258.     [gag free];
  259. will leave a lot of garbage around (because freeing an OrdCltn does
  260. not free the elements of the OrdCltn.
  261.  
  262. Deepcopy works by generating the transitive closure of the object and
  263. using shallowCopy on each object in the graph.
  264.  
  265. To recap.  There are three copy methods:
  266.  
  267. - shallowCopy
  268.    returns a bitwise copy of the receiver
  269.  
  270. - copy
  271.    returns a "useful" copy of the receiver
  272.    The meaning of useful is subject to the interpretation of the
  273.    implementor.  A file object, for instance, might (or might not)
  274.    dup the fd, or might use the same fd.
  275.  
  276. - deepcopy
  277.    returns an independent copy of the receiver and its components.
  278.    Messages sent to the copy will have NO effect on the receiver.
  279.  
  280. The above is how Stepstone's copy methods work.  I have found both
  281. deepcopy and copy to be usefull.  It is not clear that shallowCopy is
  282. of much use except for implementing the other copy methods.
  283.  
  284. Ken
  285. --
  286. Kenneth Lerman                  ...!uunet!casey!gaboon!seltd!lerman
  287. Systems Essentials Limited                            (203)426-4430
  288. 55 Main Street
  289. Newtown, CT 06470
  290.    
  291.  
  292. Return-Path: <burchard@geom.umn.edu>
  293. Date: Tue, 23 Feb 93 16:51:34 -0600
  294. From: burchard@geom.umn.edu
  295. To: Kenneth Lerman <seltd!lerman@uunet.UU.NET>
  296. Subject: Re: Cleanup of basic Obj-C memory management protocol
  297. Cc: gnu-objc@gnu.ai.mit.edu
  298.  
  299. > Paul Burchard    <burchard@geom.umn.edu> wrote (as part of a long  
  300. posting):
  301. > > 
  302.  
  303. > > ###-deepCopy###
  304. > >     This method should not really exist, except for compatibility
  305. > >     with Stepstone's Obj-C.  If this method doesn't perform the
  306. > >     same operation as -copy, described above, it's probably
  307. > >     the wrong thing to do.
  308. > > 
  309.  
  310.  
  311. > (IMHO) No.  Copy and deep copy are NOT the same.
  312.  
  313. [...] 
  314.  
  315. > - deepcopy
  316. >    returns an independent copy of the receiver and its components.
  317. >    Messages sent to the copy will have NO effect on the receiver.
  318.  
  319. > The above is how Stepstone's copy methods work.  I have found both
  320. > deepcopy and copy to be usefull.  It is not clear that shallowCopy 
  321.  
  322. > is of much use except for implementing the other copy methods.
  323.  
  324. I like your summary of the methods, and I agree: the -deepCopy method  
  325. should get some respect, and at least eventually, a proper  
  326. implementation.
  327.  
  328. At the moment, it is defined in the release to be equivalent to  
  329. Object's +new (!!).  I felt that making work like -copy would be at  
  330. least a step in the right direction.  But your point is well taken.
  331.  
  332. Implementing -deepCopy is not a complete triviality like the other  
  333. methods I discussed, so I'd like to register those changes before  
  334. -deepCopy is tackled.  (Doing -deepCopy right would seem to depend on  
  335. the outcome of the encoding discussion...).
  336.  
  337. --------------------------------------------------------------------
  338. Paul Burchard    <burchard@geom.umn.edu>
  339. ``I'm still learning how to count backwards from infinity...''
  340. --------------------------------------------------------------------
  341.  
  342.  
  343.  
  344. Return-Path: <bungi@omnigroup.com>
  345. Date: Tue, 23 Feb 93 23:55:32 -0800
  346. From: Timothy J. Wood <bungi@omnigroup.com>
  347. To: gnu-objc@gnu.ai.mit.edu
  348. Subject: Cleanup of basic Obj-C memory management protocol
  349.  
  350.   Some thoughts about memory management and -copy/-deepCopy...  Say we have:
  351.  
  352. @interface Blorf : Object
  353. {
  354.     id blegga;
  355. }
  356. @end
  357.  
  358.  
  359.   Then if
  360.  
  361.     aBlorf = [[Blorf alloc] init];
  362.     ...
  363.     copyOfBlorf = [aBlorf copy];
  364.     ...
  365.     [copyOfBlorf free];
  366.  
  367.  
  368.   we need to resolve the question of ownership of blegga.  Does aBlorf or  
  369. copyOfBlorf own it?  Obviously the compiler can't resolve this question for  
  370. us; the programmer must do so.
  371.   One obvious solution is to have two types of -free (called -free and  
  372. -shallowFree), just as we have two types of copy.  For this class they might  
  373. be implemented something like this:
  374.  
  375. - free { [blegga free]; return [super free]; }
  376. - shallowFree { return [super free]; }
  377.  
  378.   (The reason for not naming them -free and -deepFree is that existing code  
  379. assumes -free == -deepFree)
  380.  
  381.   An alternative approach would be to implement reference counting of objects  
  382. in the Object class and have -copy increment the ref count of the instance  
  383. variable objects in the copied object while -deepCopy would just make new  
  384. instances with a refCount of one.  -free could then decrement the refCount  
  385. and the really free the object if the refCount hits zero.
  386.  
  387.   I guess what I am proposing is that one or the other (or some other)  
  388. approach to handling this sort of thing is standardized in the GNU ObjC  
  389. runtime/class hierarchy.  This is something that NeXT has sadly neglected in  
  390. their implementation.
  391.  
  392.  
  393. Timothy J. Wood
  394. The Omni Group
  395.  
  396.  
  397.  
  398. Return-Path: <burchard@geom.umn.edu>
  399. Date: Wed, 24 Feb 93 10:48:41 -0600
  400. From: burchard@geom.umn.edu
  401. To: Timothy J. Wood <bungi@omnigroup.com>
  402. Subject: Re: Cleanup of basic Obj-C memory management protocol
  403. Cc: gnu-objc@gnu.ai.mit.edu
  404.  
  405. >     aBlorf = [[Blorf alloc] init];
  406. >     ...
  407. >     copyOfBlorf = [aBlorf copy];
  408. >     ...
  409. >     [copyOfBlorf free];
  410.  
  411.  
  412. >   we need to resolve the question of ownership of [id
  413. > instance var] blegga.  Does aBlorf or copyOfBlorf own it?    
  414.  
  415.  
  416. This issue is supposed to be resolved by -copy (in collaboration with  
  417. -deep).  Recall that -copy is supposed to produce a *working*  
  418. duplicate of the receiver, in a way appropriate to the class.
  419.  
  420. Usually, this means that -deep will simply apply -copy to all its id  
  421. instance vars (like blegga); in this case there is no ownership  
  422. dispute:
  423.  
  424.     @implementation NormalClass
  425.     // Don't have to override -copy.
  426.     - deep
  427.     {
  428.         if(![super deep]) return nil;
  429.         blegga = [blegga copy];
  430.         return self;
  431.     }
  432.     @end
  433.  
  434. However, if you want to implement some sort of sharing strategy (such  
  435. as copy-on-write), then -copy simply sets up something to keep track  
  436. of that.  For example:
  437.  
  438.     @implementation CopyOnWriteClass
  439.     {
  440.         id sharedFrom, sharedTo; // linked list
  441.         id huge;
  442.     }
  443.     - (BOOL)isShared { return(sharedFrom || sharedTo); }
  444.     - copy
  445.     {
  446.         // -deep will be performed on the copy later, lazily...
  447.         id rtn, from = sharedFrom;
  448.         sharedFrom = self;
  449.         rtn = [self shallowCopy];
  450.         sharedFrom = from; sharedTo = rtn;
  451.         return (rtn);
  452.     }
  453.     - deep
  454.     {
  455.         [self _unlink];
  456.         huge = [huge copy]; // get our own personal copy
  457.         return self;
  458.     }
  459.     - free
  460.     {
  461.         if([self isShared]) [self _unlink];
  462.         else [huge free];
  463.         return [super free];
  464.     }
  465.     - destructivelyChangeSomething:(void *)data
  466.     {
  467.         if([self isShared]) [self deep]; // here is lazy -deep
  468.         [huge destructivelyChangeSomething:data];
  469.         return self;
  470.     }
  471.  
  472.     - _unlink
  473.     {
  474.         ((CopyOnWriteClass *)sharedFrom)->sharedTo = sharedTo;
  475.         ((CopyOnWriteClass *)sharedTo)->sharedFrom = sharedFrom;
  476.         return self;
  477.     }
  478.     @end
  479.  
  480. >   I guess what I am proposing is that one or the other (or some
  481. > other) approach to handling this sort of thing is
  482. > standardized in the GNU ObjC runtime/class hierarchy. 
  483.  
  484. > This is something that NeXT has sadly neglected in their
  485. > implementation. 
  486.  
  487.  
  488. I don't think standardization would be helpful since there are a  
  489. whole variety of memory management schemes that you might want to  
  490. implement for various classes; the standard one and copy-on-write are  
  491. just two.  There's also reference counting and recycling, for  
  492. example.  Not to mention real garbage collection (dreaming...).
  493.  
  494. Instead there should be some standard protocols and guidelines for  
  495. classes that want to implement various such strategies.  Once they  
  496. have been thought through, they are all basically trivial to  
  497. implement; the main problem is setting up good guidelines that work  
  498. smoothly with all the features of the runtime.
  499.  
  500. --------------------------------------------------------------------
  501. Paul Burchard    <burchard@geom.umn.edu>
  502. ``I'm still learning how to count backwards from infinity...''
  503. --------------------------------------------------------------------
  504.  
  505. Return-Path: <a3bee2!seltd!lerman@mercury.hsi.com>
  506. From: Kenneth Lerman <seltd!lerman@uunet.UU.NET>
  507. X-Mailer: SCO System V Mail (version 3.2)
  508. To: bungi@omnigroup.com, gnu-objc@gnu.ai.mit.edu
  509. Subject: Re: Cleanup of basic Obj-C memory management protocol
  510. Date: Wed, 24 Feb 93 16:11:20 EST
  511.  
  512.  
  513. Timothy J. Wood <uunet!omnigroup.com!bungi@gaboon.UUCP> wrote:
  514. ...
  515. >@interface Blorf : Object
  516. >{
  517. >    id blegga;
  518. >}
  519. >@end
  520. >
  521. >
  522. >  Then if
  523. >
  524. >    aBlorf = [[Blorf alloc] init];
  525. >    ...
  526. >    copyOfBlorf = [aBlorf copy];
  527. >    ...
  528. >    [copyOfBlorf free];
  529. ...
  530.  
  531. >
  532. >- free { [blegga free]; return [super free]; }
  533. >- shallowFree { return [super free]; }
  534. >
  535. >  (The reason for not naming them -free and -deepFree is that existing code  
  536. >assumes -free == -deepFree)
  537. ...
  538.  
  539. IMHO, this is not correct.  [anOrdCltn free] does NOT free the
  540. elements of the OC.
  541.  
  542. The present philosophy (my understanding of Stepstone's
  543. implementations) is that new and free complement one another in the
  544. sense that free frees all of the memory allocated by new.  The same is
  545. true of the copy and free.
  546.  
  547. So, [copyOfBlorf free] will free the copy of blorf.  blegga will be
  548. freed by this if and only if [aBlorf copy] made a copy of  blegga.
  549. ...
  550. >
  551. > An alternative approach would be to implement reference counting of objects  
  552. >in the Object class and have -copy increment the ref count of the instance  
  553. >variable objects in the copied object while -deepCopy would just make new  
  554. >instances with a refCount of one.  -free could then decrement the refCount  
  555. >and the really free the object if the refCount hits zero.
  556.  
  557. Stepstone's class SharObject implements this type of reference
  558. counting.  It  is sometimes useful.
  559. ...
  560.  
  561. >Timothy J. Wood
  562. >The Omni Group
  563.  
  564. Ken
  565. --
  566. Kenneth Lerman                  ...!uunet!casey!gaboon!seltd!lerman
  567. Systems Essentials Limited                            (203)426-4430
  568. 55 Main Street
  569. Newtown, CT 06470
  570.  
  571. Return-Path: <wiltel!bshirley@uunet.uu.net>
  572. From: Bill Shirley <wiltel!bshirley@uunet.uu.net>
  573. Date: Wed, 24 Feb 93 17:39:00 -0600
  574. To: GNUObjC@uunet.uu.net
  575. Subject: Cleanup of basic Obj-C memory management protocol
  576.  
  577. > From: Timothy J. Wood <uunet!omnigroup.com!bungi>
  578.  
  579. >   Some thoughts about memory management and -copy/-deepCopy...  Say we have:
  580.  
  581. > @interface Blorf : Object
  582. > {
  583. >     id blegga;
  584. > }
  585. > @end
  586.  
  587.  
  588. >   Then if
  589.  
  590. >     aBlorf = [[Blorf alloc] init];
  591. >     ...
  592. >     copyOfBlorf = [aBlorf copy];
  593. >     ...
  594. >     [copyOfBlorf free];
  595.  
  596.  
  597. >   we need to resolve the question of ownership of blegga.  Does aBlorf or
  598. > copyOfBlorf own it?  Obviously the compiler can't resolve this question
  599. > for us; the programmer must do so.
  600.  
  601. (I believe that I'm about to agree w/ what Paul B said)
  602. PB > I don't think standardization would be helpful since there are a whole
  603. PB > variety of memory management schemes that you might want to implement for
  604. PB > various classes; the standard one and copy-on-write are just two.  There's
  605. PB > also reference counting and recycling, for example.  Not to mention real
  606. PB > garbage collection (dreaming...). 
  607.  
  608.  
  609.  
  610. I think it must be determined on a class by class basis.
  611.  
  612. And copy should be implemented in a many that would allow the returned
  613. instance to be freed.  To force a programmer into on pigeon hole
  614. when he may want another is not good.  He may want his copy to up the 
  615.  
  616. reference count in the instance variable, or create a new one.  Who's
  617. to say which is better?  (A: the programmer is, not the language implementer)
  618.  
  619. >   One obvious solution is to have two types of -free (called -free and
  620. > -shallowFree), just as we have two types of copy.  For this class they might
  621. > be implemented something like this: 
  622.  
  623.  
  624. > - free { [blegga free]; return [super free]; }
  625. > - shallowFree { return [super free]; }
  626.  
  627. >   (The reason for not naming them -free and -deepFree is that existing code
  628. > assumes -free == -deepFree) 
  629.  
  630.  
  631. >   An alternative approach would be to implement reference counting of
  632. > objects in the Object class and have -copy increment the ref count of the
  633. > instance variable objects in the copied object while -deepCopy would just
  634. > make new instances with a refCount of one.  -free could then decrement the
  635. > refCount and the really free the object if the refCount hits zero. 
  636.  
  637.  
  638. >   I guess what I am proposing is that one or the other (or some other) approach
  639. > to handling this sort of thing is standardized in the GNU ObjC
  640. > runtime/class hierarchy.  This is something that NeXT has sadly neglected
  641. > in their implementation. 
  642.  
  643.  
  644.  
  645. > Timothy J. Wood
  646. > The Omni Group
  647.  
  648.  
  649.  
  650.  
  651.  
  652. -Bill Shirley
  653.  
  654. Date: Sat, 27 Feb 93 21:48:11 -0600
  655. From: burchard@geom.umn.edu
  656. To: gnu-objc@gnu.ai.mit.edu
  657. Subject: Re: Cleanup of basic Obj-C memory management protocol
  658. Cc: Steve_Naroff@NeXT.COM
  659.  
  660. I just wanted to let folks know that (thanks to advice from Linus) I changed the name of the message  -deep  to  -deepen  in the actual submission I made to GNU.  The name  -deepen  has the advantage of being a verb, and it also more clearly describes the purpose of the message.  Thus, the default  -copy  in Object is implemented as
  661.  
  662.   - copy { return [[self shallowCopy] deepen]; }  // override -deepen
  663.  
  664. Sorry for belaboring such trivialities....but they are fundamental trivialities :-)
  665.  
  666. --------------------------------------------------------------------
  667. Paul Burchard    <burchard@geom.umn.edu>
  668.   ********** Global variables: the ``GOTO'' of the 90's **********
  669. --------------------------------------------------------------------
  670.  
  671.